package com.xiaoy.core.side4.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
@Entity
@Table(name = "TEST_STUDENT")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@SequenceGenerator(sequenceName = "TEST_STUDENT_SEQ", name = "TEST_STUDENT_SEQ", allocationSize = 1)
public class Student {

	private long id;
	private String name;
	private long age;
	private Date birthday;
	
//	private Teacher teacher;
	
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "TEST_STUDENT_SEQ")
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public long getAge() {
		return age;
	}
	public void setAge(long age) {
		this.age = age;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
//	public Teacher getTeacher() {
//		return teacher;
//	}
//	public void setTeacher(Teacher teacher) {
//		this.teacher = teacher;
//	}
	
}
